/*
 * Copyright © 2023
 * @Author: zhangxiang
 * @Date: 2023-05-15 09:48:24
 * @LastEditors: zhangxiang
 * @LastEditTime: 2023-07-26 09:39:52
 * @Description:
 *
 */

import Layout from '@/layout'

/**
 * @description: 业务编排路由
 * @return {*}
 */
const orchestrateRouter = {
  path: '/orchestrate', // 根路径
  component: Layout,
  redirect: '/orchestrate/traditional', // 重定向
  name: 'CNMgmt', // 名称
  meta: {
    title: '业务编排', // 标题
    menuNameKey: 'Orchestrate',
    icon: 'orchestrate' // icon
  },
  children: [
    {
      path: 'traditional', // 路径
      name: 'OrchestrateTraditional', // 路由跳转name
      component: () => import('@/views/orchestrate/traditional'), // 视图对应的组件
      meta: {
        title: '传统编排', // 标题
        menuNameKey: 'OrchestrateTraditional',
        icon: '', // svg对应的icon
        menuKey: 'OrchestrateTraditional' // menu权限控制key
      }
    },
    {
      path: 'visualized', // 路径
      component: () => import('@/views/orchestrate/visualized/route'), // 视图对应的组件
      name: 'OrchestrateVisualized', // 路由跳转name
      redirect: '/orchestrate/visualized/index',
      meta: {
        title: '可视化编排', // 标题
        menuNameKey: 'OrchestrateVisualized',
        icon: '',
        menuKey: 'OrchestrateVisualized' // menu权限控制key
      },
      children: [
        {
          path: 'index', // 路径
          name: 'OrchestrateVisualizedIndex', // 路由跳转name
          component: () => import('@/views/orchestrate/visualized/index'), // 视图对应的组件
          meta: {
            menuNameKey: 'OrchestrateVisualizedIndex',
            title: '资源编排' // 标题
          }
        },
        {
          path: 'template', // 路径
          name: 'OrchestrateVisualizedTemplate', // 路由跳转name
          component: () => import('@/views/orchestrate/visualized/template'), // 视图对应的组件
          meta: {
            menuNameKey: 'OrchestrateVisualizedTemplate',
            title: '资源模板' // 标题
          }
        },
        {
          path: 'list', // 路径
          name: 'OrchestrateVisualizedList', // 路由跳转name
          component: () => import('@/views/orchestrate/visualized/list'), // 视图对应的组件
          meta: {
            menuNameKey: 'OrchestrateVisualizedList',
            title: '已编排列表' // 标题
          }
        },
        {
          path: 'detail', // 路径
          name: 'OrchestrateVisualizedDetail', // 路由跳转name
          component: () => import('@/views/orchestrate/visualized/list/detail'), // 视图对应的组件
          hidden: true,
          meta: {
            title: '编排详情',
            icon: '',
            menuKey: 'OrchestrateVisualizedDetail',
            activeMenu: '/orchestrate/visualized/list'
          }
        }
      ]
    }
  ]
}

export default orchestrateRouter
